package ttt;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.SQLException;

public class PGHelper {

    public Connection conn = null;
    public PreparedStatement pst = null;

    public PGHelper(String sql){
        try {
            Class.forName("org.postgresql.Driver");
            conn = DriverManager.getConnection("jdbc:postgresql://192.168.2.236:5432/data_transfer?user=postgres&password=postgres");
            pst = conn.prepareStatement(sql);
        } catch (Exception e) {
            e.printStackTrace();
            System.err.println(e.getClass().getName()+": "+e.getMessage());
            System.exit(0);
        }


    }
}
